﻿#include "ssCfgData.h"

namespace StarSeeker
{

ssICfgRow::ssICfgRow()
{
	//Register();
	m_count = 0;
}

ssICfgRow::~ssICfgRow()
{
}

ssICfgValue* ssICfgRow::GetValue()
{
	if (m_count < m_list.size())
	{
		return m_list[m_count++];
	}
	return 0;
}

StarSeeker::i64 ssICfgRow::GetKey()
{
	i64 ret = -1;
	if (m_key.size()==2)
	{
		ret = m_key[0]->GetI32();
		ret = (ret << 32) | m_key[1]->GetI32();
		return ret;
	}
	else if (m_key.size()==1)
	{
		ret = m_key[0]->GetI32();
		return ret;
	}
	return ret;
}

void ssICfgRow::ClearTempData()
{
	m_key.clear();
	m_list.clear();
}

}
